# == Schema Information
# Schema version: 38
#
# Table name: photo_comments
#
#  id           :integer(11)     not null, primary key
#  user_id      :integer(11)
#  photo_id     :integer(11)
#  title        :string(255)
#  content      :text
#  content_html :text
#  created_at   :datetime
#  updated_at   :datetime
#

class PhotoComment < ActiveRecord::Base
  belongs_to :user
  belongs_to :photo
  
  validates_presence_of :content
  format_attribute :content
  
  def editable_by?(user)
    user!=:false && user.id == user_id
  end

end
